﻿<!DOCTYPE html>
<head>
    <meta charset="utf-8" />
	<title>挺赞洗衣</title>
    <meta name="description" content="Dashboard" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="shortcut icon" href="__PUBLIC__/admin/img/tingzan.jpg" type="image/x-icon">
    <!--Basic Styles-->
    <link href="__PUBLIC__/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link id="bootstrap-rtl-link" href="" rel="stylesheet" />
    <link href="__PUBLIC__/assets/css/font-awesome.min.css" rel="stylesheet" />
    <link href="__PUBLIC__/assets/css/weather-icons.min.css" rel="stylesheet" />
    <!--Fonts-->
   <!-- <link href="http://fonts.useso.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300" rel="stylesheet" type="text/css">-->
    <!--Beyond styles-->
    <link id="beyond-link" href="__PUBLIC__/assets/css/beyond.min.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/assets/css/demo.min.css" rel="stylesheet" />
    <link href="__PUBLIC__/assets/css/typicons.min.css" rel="stylesheet" />
    <link href="__PUBLIC__/assets/css/animate.min.css" rel="stylesheet" />
    <link id="skin-link" href="" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/assets/css/dataTables.bootstrap.css" rel="stylesheet" />
    <!--Skin Script: Place this script in head to load scripts for skins and rtl support-->
    <script src="__PUBLIC__/assets/js/skins.min.js"></script>
</head>
<!-- /Head -->
<!-- Body -->
<body>
    <!-- Loading Container -->
    <div class="loading-container">
        <div class="loading-progress">
            <div class="rotator">
                <div class="rotator">
                    <div class="rotator colored">
                        <div class="rotator">
                            <div class="rotator colored">
                                <div class="rotator colored"></div>
                                <div class="rotator"></div>
                            </div>
                            <div class="rotator colored"></div>
                        </div>
                        <div class="rotator"></div>
                    </div>
                    <div class="rotator"></div>
                </div>
                <div class="rotator"></div>
            </div>
            <div class="rotator"></div>
        </div>
    </div>
    <!--  /Loading Container -->
    <!-- Navbar -->
    <div class="navbar">
        <div class="navbar-inner">
            <div class="navbar-container">
                <!-- Navbar Barnd -->
                <div class="navbar-header pull-left">
                    <a href="#" class="navbar-brand">
                        <small>
                            <img src="__PUBLIC__/assets/img/logo2.png" alt="" />
                        </small>
                    </a>
                </div>
                <!-- /Navbar Barnd -->
                <!-- Sidebar Collapse -->
                <div class="sidebar-collapse" id="sidebar-collapse">
                    <i class="collapse-icon fa fa-bars"></i>
                </div>
                <!-- /Sidebar Collapse -->
                <!-- Account Area and Settings --->
                <div class="navbar-header pull-right">
                    <div class="navbar-account">
                        <ul class="account-area">
                            <li>
                                <a class="login-area dropdown-toggle" data-toggle="dropdown">
                                    <div class="avatar" title="View your public profile">
                                        <img src="{$session.admin.user.img}">
                                    </div>
                                    <section>
                                        <h2><span class="profile" style="width: 103px;"><span> {$session.admin.user.name}[{$session.admin.user.rolename}]  </span></span></h2>
                                    </section>
                                </a>
                                <!--Login Area Dropdown-->
                                <ul class="pull-right dropdown-menu dropdown-arrow dropdown-login-area">
                                    <li class="email"><a>{$session.admin.user.mail}</a></li>
                                    <!--Avatar Area-->
                                    <li>
                                        <div class="avatar-area">
                                            <img src="{$session.admin.user.img}" class="avatar">
                                             <a href="{:U('Admin/User/user_set',array('id'=>$session['admin']['user']['id']))}" class="pull-right" data-loader="bb-loader" data-loadername="账户设置">
                                            		<span class="caption">更换头像</span>
                                            	 </a>
                                        </div>
                                    </li>
                                    <!--Avatar Area-->
                                    <li class="edit">
                                        <a href="#" class="pull-left"> {$session.admin.user.user} </a>
                                        <a href="{:U('Admin/User/user_set',array('id'=>$session['admin']['user']['id']))}" class="pull-right" data-loader="bb-loader" data-loadername="账户设置">设置</a>
                                    </li>
                                    <!--Theme Selector Area-->
                                    <li class="theme-area">
                                        <ul class="colorpicker" id="skin-changer">
                                            <li><a class="colorpick-btn" href="#" style="background-color:#5DB2FF;" rel="__PUBLIC__/assets/css/skins/blue.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#2dc3e8;" rel="__PUBLIC__/assets/css/skins/azure.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#03B3B2;" rel="__PUBLIC__/assets/css/skins/teal.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#53a93f;" rel="__PUBLIC__/assets/css/skins/green.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#FF8F32;" rel="__PUBLIC__/assets/css/skins/orange.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#cc324b;" rel="__PUBLIC__/assets/css/skins/pink.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#AC193D;" rel="__PUBLIC__/assets/css/skins/darkred.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#8C0095;" rel="__PUBLIC__/assets/css/skins/purple.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#0072C6;" rel="__PUBLIC__/assets/css/skins/darkblue.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#585858;" rel="__PUBLIC__/assets/css/skins/gray.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#474544;" rel="__PUBLIC__/assets/css/skins/black.min.css"></a></li>
                                            <li><a class="colorpick-btn" href="#" style="background-color:#001940;" rel="__PUBLIC__/assets/css/skins/deepblue.min.css"></a></li>
                                        </ul>
                                    </li>
                                    <!--/Theme Selector Area-->
                                    <li class="dropdown-footer">
                                        <a href="{:U('Admin/Login/out')}">
                                        	退出
                                        </a>
                                    </li>
                                </ul>
                                <!--/Login Area Dropdown-->
                            </li>
                            <!-- /Account Area -->
                            <!--Note: notice that setting div must start right after account area list.
                            no space must be between these elements-->
                            <!-- Settings -->
                        </ul>
                        <!-- Settings -->
                    </div>
                </div>
                <!-- /Account Area and Settings -->
            </div>
        </div>
    </div>
    <!-- /Navbar -->
    <!-- Main Container -->
    <div class="main-container container-fluid">
        <!-- Page Container -->
        <div class="page-container">
            <!-- Page Sidebar -->
            <div class="page-sidebar" id="sidebar">
                <!-- Page Sidebar Header-->
                <div class="sidebar-header-wrapper">
                    <input type="text" class="searchinput" />
                    <i class="searchicon fa fa-search"></i>
                    <div class="searchhelper"> </div>
                </div>
                <!-- /Page Sidebar Header -->
                <!-- Sidebar Menu -->
                <ul class="nav sidebar-menu">
                	<volist name="cache" id="a">
                		<empty name="a._data">
                			<li class="active">
								<a id="Home" href="{$a.name|U}"  data-loader="bb-loader" data-loadername="{$a.title}">
		                            <i class="{$a.ico}"></i>
		                            <span class="menu-text"> {$a.title} </span>
		                        </a>
	                        </li>
						<else /> 
							<li>
		                       <a href="{$a.name|U}" class="menu-dropdown">
		                       		<i class="{$a.ico}"></i>
		                            <span class="menu-text"> {$a.title}  </span>
		                            <i class="menu-expand"></i>
		                        </a>
		                        <ul class="submenu">
		                        <volist name="a._data" id="b">
		                        	<empty name="b._data">
		                        		<li>
											<a href="{$b.name|U}" data-loader="bb-loader" data-loadername="{$b.title}">
					                            <i class="{$b.ico}"></i>
					                            <span class="menu-text"> {$b.title} </span>
					                             <i class="menu-expand"></i>
					                        </a>
				                        </li>
		                        	<else /> 
		                        		<li>
					                       <a href="{$b.url|U}" class="menu-dropdown">
					                            <i class="{$b.ico}"></i>
					                            <span class="menu-text"> {$b.title} </span>
					                            <i class="menu-expand"></i>
					                        </a>
					                        <ul class="submenu nemub">
		                        			<volist name="b._data" id="c">
		                        				<empty name="c._data">
		                        					<li>
													<a href="{$c.name|U=###, array('param'=>$c['param'])}" data-loader="bb-loader" data-loadername="{$c.title}">
							                           <i class="{$c.ico}"></i>
							                           <span class="menu-text"> {$c.title} </span>
							                           <i class="menu-expand"></i>
							                        </a>
						                        </li>
		                        				<else /> 
			                        				<li>
							                       <a href="{$c.url|U}" class="menu-dropdown">
							                            <i class="{$c.ico}"></i>
							                            <span class="menu-text"> {$c.title} </span>
							                            <i class="menu-expand"></i>
							                        </a>
							                        <ul class="submenu nemuc">
				                        			    		<foreach name="c._data" item="d" >
														   <li>
																<a href="{$d.name|U=###, array('param'=>$d['param'])}" data-loader="bb-loader" data-loadername="{$d.title}">
										                           <i class="{$d.ico}"></i>
										                           <span class="menu-text"> {$d.title} </span>
										                           <i class="menu-expand"></i>
										                        </a>
									                        </li>
														</foreach>
				                        				</ul>
						                    </empty>  
		                        			</volist>
		                        			</ul>
		                        		</li>
		                        	</empty> 
								</volist>
								</ul>
							</li>
						</empty> 
                	</volist>
				<if condition="$session['admin']['user']['role']==1 || $session['admin']['user']['role']==2">
                    <li class="active">
                       <a href="#" class="menu-dropdown">
                            <i class="menu-icon glyphicon glyphicon-cog"></i>
                            <span class="menu-text"> 系统管理  </span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                         	<li>
                                <a href="{:U('Admin/User/index')}" data-loader="bb-loader" data-loadername="管理员管理">
                                    <span class="menu-text">管理员管理</span>
                                </a>
                            </li>
	                            <li>
	                                <a href="{:U('Admin/User/role')}" data-loader="bb-loader" data-loadername="角色管理">
	                                    <span class="menu-text">角色管理</span>
	                                </a>
	                            </li>
	                            
	                            <if condition="$session['admin']['user']['role']==1 ">
	                            <li>
	                                <a href="{:U('Admin/User/moder')}" data-loader="bb-loader" data-loadername="模块管理">
	                                    <span class="menu-text">模块管理</span>
	                                </a>
	                            </li>
                           		</if>
                        </ul>
                    </li>
                </if>


					<li class="active">
                       <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-list-alt"></i>
                            <span class="menu-text"> 留言管理  </span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                         	<li>
                                <a href="{:U('Admin/Notice/index')}" data-loader="bb-loader" data-loadername="留言管理">
                                    <span class="menu-text">留言信息管理</span>
                                </a>
                            </li>
	                            <li>
	                                <a href="{:U('Admin/Notice/category')}" data-loader="bb-loader" data-loadername="留言类别">
	                                    <span class="menu-text">添加留言类别</span>
	                                </a>
	                            </li>
	                            
	                            
	                          
                           		
                        </ul>
                    </li>
					
					
				
					<li class="active">
                       <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-list-alt"></i>
                            <span class="menu-text"> 财务管理  </span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                         	<li>
                                <a href="{:U('Admin/Index/sgtc')}" data-loader="bb-loader" data-loadername="手工提成">
                                    <span class="menu-text">付款提现</span>
                                </a>

                            </li>
							<li>
	                            <a href="{:U('Admin/Index/lsjl')}" data-loader="bb-loader" data-loadername="历史记录">
                                    <span class="menu-text">历史记录</span>
                                </a>
	                         </li> 
                           		
                        </ul>
                    </li>
					
					

					<li class="active">
                       <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-list-alt"></i>
                            <span class="menu-text"> 数据统计  </span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu" id="tj_f">
						
                         	<li>
                                <a href="{:U('Admin/Index/tongji_u')}" >
                                    <span class="menu-text">会员统计</span>
                                </a>
                            </li>
							
							<li>
								<a href="{:U('Admin/Index/tongji_b')}" >
									<span class="menu-text">商家统计</span>
								</a>
							</li>
							
							 <li>
								<a href="{:U('Admin/Index/tongji_a')}" >
									<span class="menu-text">管家统计</span>
								</a>
							</li>
							
							 <li>
								<a href="{:U('Admin/Index/tongji_o')}" >
									<span class="menu-text">订单统计</span>
								</a>
							</li>
							
							 <li>
								<a href="{:U('Admin/Index/tongji_p')}" >
									<span class="menu-text">交易统计</span>
								</a>
							</li>
	                            
	                            
	                          
                           		
                        </ul>
                    </li>



					<li class="active">
                       <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-list-alt"></i>
                            <span class="menu-text"> 三级分销  </span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                         	<li>
                                <a href="{:U('Admin/Index/sjfx')}" data-loader="bb-loader" data-loadername="用户管理">
                                    <span class="menu-text">用户管理</span>
                                </a>

                            </li>
                           		
                        </ul>
                    </li>

					
					
					
					

















					
                </ul>
                <!-- /Sidebar Menu -->
            </div>
            <!-- /Page Sidebar -->
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb" id="bb-bread">
                        <li>
                            <i class="fa fa-home"></i>
                            <a href="{:U('Admin/Index/main')}" data-loader="bb-loader" data-loadername="主控面板">首页</a>
                        </li>
                        <li class="active">主控面板</li>
                    </ul>
                </div>
                <!-- /Page Breadcrumb -->
                <!-- Page Header -->
                <div class="page-header position-relative">
                    <div class="header-title">
                        <h1 id="loader-title">
                          	主控面板
                        </h1>
                    </div>
                    <!--Header Buttons-->
                    <div class="header-buttons">
                        <a class="sidebar-toggler" href="#">
                            <i class="fa fa-arrows-h"></i>
                        </a>
                        <a class="bb_refresh" id="refresh-toggler" href="{:U('Admin/Index/main')}" data-loader="bb-loader" data-name="主控面板">
                            <i class="glyphicon glyphicon-refresh"></i>
                        </a>
                        <a class="fullscreen" id="fullscreen-toggler" href="#">
                            <i class="glyphicon glyphicon-fullscreen"></i>
                        </a>
                    </div>
                    <!--Header Buttons End-->
                </div>
                <!-- /Page Header -->
                <!-- Page Body -->
				
                <div id="bb-loader" class="page-body">
				
					内容
                </div>
                <!-- /Page Body -->
            </div>
            <!-- /Page Content -->
        </div>
        <!-- /Page Container -->
        <!-- Main Container -->
    </div>
    
     <!--全局隐藏控件-->
    <div class="hide">
    	 <!--Reloader-->
    	 <a id="bb-reloader" href="#">RELOADER</a>
    	  <!--图片上传-->
    	 <iframe style="display:none" name='doupimg_frame' id="doupimg_frame"></iframe> 
   		 <form enctype="multipart/form-data" action="{:U('Admin/Upload/doupimg')}" method="post" id="bb-form-upimg" target="doupimg_frame" >
		 	<input type="file" id="jupimg" name="jupimg" accept="image/*">
	 	 </form>
    </div>
   
    <!--Basic Scripts-->
    <script src="__PUBLIC__/assets/js/jquery-2.0.3.min.js"></script>
    <script src="__PUBLIC__/assets/js/bootstrap.min.js"></script>
    <script src="__PUBLIC__/assets/js/bootbox/bootbox.js"></script>
    <script src="__PUBLIC__/assets/js/validation/bootstrapValidator.js"></script>
    <script src="__PUBLIC__/assets/js/toastr/toastr.js"></script>
    <!--Beyond Scripts-->
    <script src="__PUBLIC__/assets/js/beyond.min.js"></script>
    <script src="__PUBLIC__/admin/js/comm.js"></script>
    
	<script type="text/javascript">
		var bbcleardingshirenwu;
		var LoaderTitle=$('#loader-title');
		var LoaderRefresh=$('#refresh-toggler');
		var LoaderReloader=$('#bb-reloader');
		var SbLi=$('.sidebar-menu li');
		//主导航高亮
		var Sideli=$('.submenu li');
		//公共设置HTML内容方法
		function setHtml(id,html){
			$(id).html(html);
		}
		
		//初始化主框架加载后的操作
		function initFrame(){
			//处理Frame加载后的所有链接
			var links=$('a');
			$(links).on('click',function(){			
				var loader=$(this).data('loader');
				var tourl=$(this).attr('href');
				var search=$(this).data('search');
				var name=$(this).data('loadername');
				$(LoaderReloader).attr('href',tourl).data('loader',loader).data('loadername',name);
				if(loader){
					//高亮主导航
					var li=$(this).parent('li');
					$(li).siblings().removeClass('active');
					$(SbLi).removeClass('active');
					$(li).addClass('active');
					//如果是主Loader
					if(loader=='bb-loader'){
						setHtml(LoaderTitle,name);
						$(LoaderRefresh).attr('href',tourl).data('loader',loader).data('loadername',name);
					}
					$('#'+loader).empty().load(tourl,function(){
						initLoader(loader);
					});	
					//结束定时任务
					window.clearInterval(bbcleardingshirenwu);
					return false;
				}
			});
		}
	
		//初始化Loader加载后的操作
		function initLoader(loader){
			//加载Widget特效
			InitiateWidgets();
			//处理Loader加载后的所有链接
			var loaderlinks=$('#'+loader+' a');
			$(loaderlinks).on('click',function(){
				var loader=$(this).data('loader');
				var tourl=$(this).attr('href');
				var search=$(this).data('search');
				var name=$(this).data('loadername');
				//特殊按钮特效--全部阻止
				if(loader){
					//如果是主Loader
					if(loader=='bb-loader'){
						setHtml(LoaderTitle,name);
						$(LoaderRefresh).attr('href',tourl).data('loader','bb-loader').data('loadername',name);
					}
					//如果有搜索条件绑定
					if(search){
						var sv=$('#'+search).serialize();
						if(sv){
							tourl=tourl+'?'+sv;
						}
					}
					$('#'+loader).empty().load(tourl,function(){
						initLoader(loader);
					});	
					//结束定时任务
					window.clearInterval(bbcleardingshirenwu);
					return false;
				}
			});
			
		}
		
		//公共设置面包屑导航
		function setBread(html){
			$('#bb-bread').empty().html(html);
			$('#bb-bread a').on('click',function(){
				var loader=$(this).data('loader');
				var name=$(this).data('loadername');
				var tourl=$(this).attr('href');
				setHtml(LoaderTitle,name);
				$(LoaderRefresh).attr('href',tourl).data('loader','bb-loader').data('loadername',name);
				$('#'+loader).empty().load(tourl,function(){
					initLoader(loader);
				});					
				return false;
			});
		}
	
		$(document).ready(function(){
			initFrame();
			//$('#Home').trigger('click');
		});
		
		
		//图片上传管理器
		function Imguploader(fbid,isall){
			$.ajax({
					type:"post",
					url:"{:U('Admin/Upload/indeximg')}",
					data:{'fbid':fbid,'isall':isall},
					dataType: "json",
					success:function(mb){
						bootbox.dialog({
		            	message: mb,
		            	title: "图片上传管理器",
		            	className: "modal-darkorange",
		            	buttons: {
		            		   "追加": {
			                        className: "btn-success",
			                        callback: function () {if(isall=='false'){$('#'+fbid).val($('#bb-uploader-findback').val());}else{$('#'+fbid).val($('#'+fbid).val()+$('#bb-uploader-findback').val());}}
			                    },
			                    "确认": {
			                        className: "btn-blue",
			                        callback: function () {$('#'+fbid).val($('#bb-uploader-findback').val());}
			                    },
			                    "取消": {
			                        className: "btn-danger",
			                        callback: function () { }
			                    }
		                	}
		            	});
					},
					error:function(xhr){
						$.bb.alert('danger','通讯失败！请重试！');
					}
			});
			return false;
		}
		//图片预览器
		function Imgviewer(fbid){
			var ids=$('#'+fbid).val();
			if(!ids){
				$.bb.alert('danger','您还没有图片可以预览！');
				return false;
			}
			$.ajax({
					type:"post",
					url:"{:U('Admin/Upload/Imgviewer')}",
					data:{'ids':ids},
					dataType: "json",
					success:function(mb){
						bootbox.dialog({
		            	message: mb,
		            	title: "图片预览器",
		            	className: "modal-darkorange",
		            	buttons: {
			                    success: {
			                        label: "确定",
			                        className: "btn-blue",
			                        callback: function () { }
			                    },
			                    "取消": {
			                        className: "btn-danger",
			                        callback: function () { }
			                    }
		                	}
		            	});
					},
					error:function(xhr){
						$.bb.alert('danger','通讯失败！请重试！');
					}
			});
			return false;
		}
		
		
		//Joel默认百度地图控件
		function baiduDitu(fbaddid,fblngid,fblatid){
			var fbadd=$('#'+fbaddid);
			var fblng=$('#'+fblngid);
			var fblat=$('#'+fblatid);
			if(!fbadd || !fblng || !fblat){
				$.bb.alert('danger','回调控件不完整!');
			}

			//fbid 查找带回的文本框ID,全局唯一		
			$.ajax({
					type:"post",
					url:"/Admin/Login/baiduDitu",
					data:{'address':$(fbadd).val(),'lng':$(fblng).val(),'lat':$(fblat).val()},
					dataType: "json",
					success:function(mb){
						bootbox.dialog({
	                	message: mb,
	                	title: "百度地图控件",
	                	className: "modal-darkorange",
	                	buttons: {
			                    success: {
			                        label: "确定",
			                        className: "btn-blue",
			                        callback: function () { 
			                        	$(fbadd).val($('#baiduDituaddress').val());
			                        	$(fblng).val($('#baiduDitulng').val());
			                        	$(fblat).val($('#baiduDitulat').val());
			                        }
			                    },
			                    "取消": {
			                        className: "btn-danger",
			                        callback: function () { }
			                    }
		                	}
		            	});
					},
					error:function(xhr){
						$.bb.alert('danger','通讯失败！请重试！');
					}
			});
			return false;
		}
	</script>
</body>
<!--  /Body -->
</html>

					<script>
					$(function (){
						$("#tj_f li a").click(function(){
							$("#bb-loader").html('<iframe src="'+$(this).attr('href')+'" style="width:100%;height:800px;border:none;"></iframe>');
							return false;
						});
					});
					</script>

